Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Add nvm and Node provisioning to the-vagrant #56

Merged
merged 1 commit into from
Nov 28, 2018
Merged

Conversation

becw
Copy link
Member

@becw becw commented Aug 22, 2018

Completes ZRAD-118 - Add nvm/node provisioning to the-vagrant.

To test:

  1. In an existing project with up-to-date the-vagrant (for example, palantirnet-d8), update to this branch: composer require --dev palantirnet/the-vagrant:dev-nvm-node-provisioning
  2. Reinstall the-vagrant: vendor/bin/the-vagrant-installer
  3. Make sure you use the same hostname when you respond
  4. Check the diff to verify that changes to the Vagrantfile are limited to the changes in this PR: git diff
  5. Re-provision your Vagrant box: vagrant up --provision or vagrant reload --provision
  6. SSH in to the Vagrant environment
  7. Verify that nvm is installed: nvm --version (should be 0.33.11)
  8. Verify that node is installed: node --version (should be whatever you entered when you installed)

Open questions:

  • Should the default version of node be 8, 9, or something else?

@becw becw requested a review from byrond August 22, 2018 21:58
Copy link
Contributor

@byrond byrond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked great for me and looks like a simple way to manage Node in the vagrant on projects. I did test one case where I updated the-vagrant and ran vagrant reload --provision without running the-vagrant-installer and was greeted with an error:

ERROR! the role 'leanbit.nvm' was not found in /Users/byronduvall/ntc/vendor/palantirnet/the-vagrant/conf/vagrant/provisioning/roles:/Users/byronduvall/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/Users/byronduvall/ntc/vendor/palantirnet/the-vagrant/conf/vagrant/provisioning

The error appears to have been in '/Users/byronduvall/ntc/vendor/palantirnet/the-vagrant/conf/vagrant/provisioning/drupal8-skeleton.yml': line 18, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    - { role: gulp }
    - { role: leanbit.nvm,
      ^ here

Do developers normally re-run the installer when upgrading the-vagrant on a project (and risk losing their customizations), or should this be able to handle the situations where the installer isn't run?

@becw
Copy link
Member Author

becw commented Nov 14, 2018

This PR adds the leanbit.nvm role from Ansible Galaxy, which requires changes to the project's Vagrantfile... meaning that to upgrade, this will require reinstalling the-vagrant.

We talked about this last week, and determined that we should save this PR for a minute and create the 2.3 release after merging it.

@becw becw merged commit 902e266 into develop Nov 28, 2018
@becw becw deleted the nvm-node-provisioning branch November 28, 2018 21:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants